<template>
    <div style="height: 100%;">
      <HeaderTag :initHeader="initData.header" ref="headerData"></HeaderTag>
      <NavTag :initNav="initData.nav"></NavTag>
      <router-view class="main-controller-body"/>
    </div>
</template>

<script>
  import HeaderTag from "../header/Header";
  import NavTag from "../nav/Nav";
    export default {
        name: "Index",
        data(){
          return {
            initData:{}
          }
        },
        components:{
          HeaderTag,
          NavTag
        },

        created(){
          this.$axios.post(this.HOST+"/web/1000000",{})
          .then((data)=> {
            //console.log(data);
            this.initData = data.data;
            //console.log(this.initData);
            sessionStorage.setItem("initHtmlData",JSON.stringify(data.data.initHtmlModal));
            //console.log(JSON.parse(sessionStorage.getItem("initHtmlData")));
            /* if( JSON.parse(sessionStorage.getItem("initHtmlData")).tree ){ //有树结构跳转到属性模板
               this.$router.push({path:"/"});
             }else { //表格模板
               this.$router.push({path:"/tableHtml"});
             }*/
          }).catch((err)=>{
            //console.log(err);
          })
        }
    }
</script>

<style scoped>

</style>
